<?php
	require "../modules/conn.php";
	session_start();
	$uid=$_SESSION["uid"];
	$sid=$_SESSION["sid"];
	$sql1="select * from t_watch where w_sell_id=$sid and w_user_id=$uid";
	$result1=mysqli_query($conn,$sql1);

	if($result1){
		if(!mysqli_num_rows($result1)){
			$sql="insert into t_watch(w_user_id,w_sell_id) values($uid,$sid)";
			$result=mysqli_query($conn,$sql);
		}	
	}else{
		echo "error";
	}
?>